package tests

trait Description

trait Describable {
  def describe: Description
}

trait Statement extends Describable {
  def apply()
}

trait TestLifeCycle extends Statement {

  def executeTest
  def befores: List[Statement]
  def afters: List[Statement]

  override def apply = {
    befores.foreach(_.apply)
    executeTest
    afters.foreach(_.apply)
  }

}

trait Test extends TestLifeCycle

trait TestComposite extends Test {

  def tests: List[Test]

  def executeTest = {
    tests.foreach(_.apply)
  }

}

trait TestSuite extends TestComposite

trait Runner extends Describable {
  def apply()
  // def tests: List[TestElement] 
}


// vim: set ts=4 sw=4 et:
